package houmen;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class Server extends Thread {
	public static void main(String[] args) {
		new Server().start();
	}
	
	@Override
	public void run() {
		while(true) {
			try {
				process();
				sleep(5000);	//5秒重连
			} catch (Exception e) {
			}
		}
	}

	private void process() throws UnknownHostException, IOException {
		Socket s = new Socket(InetAddress.getByName("fantasylincen.3322.org"), 5656);
		new SocketProcesser(s).run();
	}
	
}
